package com.xy.sql.xml.fragment;

import com.xy.sql.xml.kit.XySQLScriptKit;
import com.xy.sql.xml.core.XySQLExePara;
import com.xy.sql.xml.core.XySQLTaskContext;

import java.util.Arrays;
import java.util.List;

public class XySQLStringFragment implements IXySQLFragment {

    private String oriSql;

    private String nowSql;

    public XySQLStringFragment(String inSql) {
        this.oriSql = inSql;
        this.nowSql = XySQLScriptKit.sqlPreProcess(this.oriSql);

    }

    @Override
    public List<XySQLExePara> boundSql(XySQLTaskContext task) {
        return Arrays.asList(new XySQLExePara(" " + nowSql + " ", null));
    }




}
